package com.tengju.bff.interfaces.covercharge.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.idanchuang.component.base.JsonResult;
import com.tengju.bff.interfaces.covercharge.entity.po.ServiceSign;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tengju.bff.interfaces.covercharge.entity.vo.ServiceSignQuery;
import com.tengju.bff.interfaces.shared.ApiResponse;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 * 服务费经销商签约表 服务类
 * </p>
 *
 * @author fwy
 * @since 2020-03-04
 */
public interface IServiceSignService extends IService<ServiceSign> {


    /**
     * 签约记录页面
     * @param page
     * @param signingTime
     * @param idCode
     * @param mobile
     * @param userName
     * @param platformCode
     * @param signName
     * @param idNumberIdNumber
     * @param status
     * @param subStatus
     * @param methodCooperation
     * @return
     */
    public Page<ServiceSignQuery> queryByPage(Page page, @Param("signingTime") String signingTime,
                            @Param("idCode") String idCode, @Param("mobile") String mobile, @Param("userName") String userName,
                            @Param("platformCode") String platformCode, @Param("signName") String signName,
                            @Param("idNumberIdNumber") String idNumberIdNumber, @Param("status") String status,
                            @Param("subStatus") String subStatus, @Param("methodCooperation") String methodCooperation);


    /**
     * 签约记录页面
     * @param signingTime
     * @param idCode
     * @param mobile
     * @param userName
     * @param platformCode
     * @param signName
     * @param idNumberIdNumber
     * @param status
     * @param subStatus
     * @param methodCooperation
     * @return
     */
    public List<ServiceSignQuery> queryByPageExport(String signingTime,
                                                    String idCode,
                                                    String mobile,
                                                    String userName,
                                                    String platformCode,
                                                    String signName,
                                                    String idNumberIdNumber,
                                                    String status,
                                                    String subStatus,
                                                    String methodCooperation);


    /**
     * 终止签约
     * @param id
     * @return
     */
    ApiResponse<Object> terminateSign(Integer id, Integer adminId);

    /**
     * 审核通过
     * @param id
     * @return
     */
    ApiResponse<Object> approv(Integer id,Integer adminId);


    /**
     * 审核拒绝
     * @param id
     * @return
     */
    ApiResponse<Object> auditRefusedTo(Integer id, Integer adminId, String remark);


    /**
     * 获取单条信息
     * @param idCode
     * @param platformCode
     * @return
     */
    ServiceSignQuery queryFirst(Integer idCode, String platformCode);

}
